package demo.scope;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created with IntelliJ IDEA.
 * User: supereme
 * Date: 8/26/13
 * Time: 12:12 AM
 * To change this template use File | Settings | File Templates.
 */
public class App {

    public static void main(String args[]) {
        ApplicationContext context = new ClassPathXmlApplicationContext(
                "application-context.xml");

        VODService vodService = (VODService) context.getBean("vodService");
        vodService.setForCustomer("Customer1");

        Video video=new Video("Video1","English") ;
        vodService.setVideo(video);

        System.out.println("Video On Demand Current video: "+vodService.getVideo()+" Language:"+vodService.getForCustomer());

        VODService vodService2 = (VODService) context.getBean("vodService");
        System.out.println("Video On Demand Current video: "+vodService2.getVideo()+" Language:"+vodService2.getForCustomer());

    }
}
